class Solution(object):
    def isPalindrome(self, x):
        """
        :type x: int
        :rtype: bool
        """
        s = []
        if x < 0:
            return False
        else:
            while x > 0:
                m = x % 10
                s.append(m)
                x = int(x / 10)
        if s != s[::-1]:
            return False
        else:
            return True
